package 动态规划;

import java.util.Arrays;

//674 最长连续递增序列
public class Solution11 {
    public int findLengthOfLCIS(int[] nums) {
        // if(nums[i]>nums[i-1]) dp[i] = dp[i-1]+1
        // else dp[i] = 1
        int n = nums.length;
        int[] dp = new int[n];
        Arrays.fill(dp,1);
        int maxLen = 1;
        for(int i = 1 ; i < n ; i++) {
            if(nums[i]>nums[i-1]){
                dp[i] = dp[i-1]+1;
                maxLen = Math.max(dp[i],maxLen);
            }
        }
        return maxLen;
    }
}
